package com.itheima;

import com.itheima.dao.AccountDao;
import com.itheima.domain.Account;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/demo")
public class controller {
    @Autowired
    private AccountService accountService;
    @RequestMapping("/findbyid")
    public String findDemo(Model model){
        Account findbyid = accountService.findbyid(1);
        model.addAttribute("findbyid",findbyid);
        return  "itemDetail";

    }
}
